package com.example.g51.controller;

import com.example.g51.service.CartRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/cart-rate")
public class CartRateController {

    @Autowired
    private CartRateService cartRateService;

    @GetMapping("/{userId}")
    public Double getCartRate(@PathVariable String userId) {
        return cartRateService.getCartRateByUserId(userId);
    }
}